#!/bin/bash
version=`grep "name=\"app.version\"" ../build.xml | awk '{ print $3}' | cut -d "\"" -f 2`
echo $version
mkdir ./tmp;
cd ./tmp
#for i in ../mp3plugin.jar ../blas.jar ../f2jutil.jar ../lapack.jar ../java-getopt-1.0.13.jar ../jsapi.jar ../sphinx4.jar ../LIUM_SpkDiarization.jar ../javacv.jar ../jna.jar ../ffmpeg-java.jar; do
#for i in ../blas.jar ../f2jutil.jar ../lapack.jar  ../mp3plugin.jar ../Jama-1.0.2.jar ../java-getopt-1.0.13.jar ../jsapi.jar ../sphinx4.jar ../junit-4.8.1.jar ../LIUM_SpkDiarization.jar ; do
for i in ../mp3plugin.jar ../java-getopt-1.0.13.jar ../jsapi.jar ../sphinx4.jar ../junit-4.8.1.jar ../LIUM_SpkDiarization.jar ; do
	jar xf $i;
done
cp ../licence*.* .
jar cmf ./META-INF/MANIFEST.MF ../LIUM_SpkDiarization-${version}.jar *
cd ..
rm -r ./tmp/*
rmdir tmp
